package xp.ass.imitate.core;

import java.util.Objects;

/**
 * @author chent3
 * @date 2024/7/22
 */
public interface EnhanceEnum<T> {

     T getCode();

     default String getDescription(){
         return "";
     }

     default boolean eq(T code){
         if (Objects.isNull(code)) {
             return false;
         }
         return Objects.equals(getCode(), code);
     }

    default boolean notEq(T code) {
        return !eq(code);
    }
}
